/*-------------------------------------------------------------------------

***************** Modification History ***********************************
   @doc
   @module visa2.h - Header file for VISA II communication protocol functions |
   @end
   
$Log: /SoftPay/SPK2SIM/Source/Visa2/visa2.h $ 
 * 
 * 2     12/01/99 4:25p Kevin_v1
 * Modularity
 * 
 * 1     7/19/99 5:46p Jim_b4
 * 
 * 1     7/19/99 4:32p Jim_b4
 * 
 * 2     6/09/99 11:22a Monique_b1
 * Change headers and file names for SP 2000
**************************************************************************

   Copyright (C) 1999 by VeriFone, Inc.

   All rights reserved.  No part of this software may be reproduced,
   transmitted, transcribed, stored in a retrieval system, or translated
   into any language or computer language, in any form or by any means,
   electronic, mechanical, magnetic, optical, chemical, manual or otherwise,
   without the prior written permission of VeriFone, Inc.

---------------------------------------------------------------------------*/



extern char chAckChar;
#define ToggleAckMACRO() if (chAckChar == ACK) chAckChar = BEL; else chAckChar = ACK;

#define MAX_NAKS               4              /* 3 NAKS stop communication  */
#define MAX_RETRIES            3              /* Try for the data thrice    */

#define VF_BHEADER_SIZE       83              /* Size of bath record header */
#define VF_BTPR_SIZE          83              /* Size of Term param record  */
#define VF_BDTR_SIZE          83              /* Size of detail tran data   */
#define VF_BTRAILER_SIZE      83              /* Size of bath trailer rec   */

#define VF_TIMEOUT_T1         15              /* Wait for first host ENQ    */
#define VF_TIMEOUT_T3         16              /* First msg to ACK t/o min   */
#define VF_TIMEOUT_T5          4              /*                            */
#define VF_TIMEOUT_T7          4              /*                            */
#define VF_TIMEOUT_T9         30              /*                            */
#define VF_TIMEOUT_T13        10              /*                            */
#define VF_TIMEOUT_T22       120              /* Wait for Host DC2          */

int inSendReceiveVISA (int inMode, PACKET_OBJECT *psrCommPackage, VS_BOOL fWaitForENQ, VS_BOOL fWaitForACK);
int inReadVisaRespPkt (int inMode, PACKET_OBJECT *psrCommPackage, int inInitialTimeout);
int inTxVisaPacket(PACKET_OBJECT *psrCommPackage, char chAckChar, VS_BOOL fWaitACKBEL, int inTimeout);
void vdSendVISACallDisconnect (void);
int inRxVisa (int inMode, PACKET_OBJECT *psrCommPackage, int inInitialTimeout, unsigned char ucAckChar);

